﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CuitHtmlFileInput.cs" company="">
//   
// </copyright>
// <summary>
//   The cuit html file input.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace UITest.CUIT.CuitControls.HtmlControls
{
    using Microsoft.VisualStudio.TestTools.UITesting;
    using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;

    /// <summary>
    /// The cuit html file input.
    /// </summary>
    public class CuitHtmlFileInput : CuitHtmlControl<HtmlFileInput>
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="CuitHtmlFileInput"/> class.
        /// </summary>
        public CuitHtmlFileInput()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CuitHtmlFileInput"/> class.
        /// </summary>
        /// <param name="testControl">
        /// The test control.
        /// </param>
        public CuitHtmlFileInput(UITestControl testControl)
            : base(testControl)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CuitHtmlFileInput"/> class.
        /// </summary>
        /// <param name="testControl">
        /// The test control.
        /// </param>
        /// <param name="searchProperties">
        /// The search properties.
        /// </param>
        public CuitHtmlFileInput(UITestControl testControl, string searchProperties)
            : base(testControl, searchProperties)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CuitHtmlFileInput"/> class.
        /// </summary>
        /// <param name="testControl">
        /// The test control.
        /// </param>
        /// <param name="searchProperties">
        /// The search properties.
        /// </param>
        /// <param name="filterProperties">
        /// The filter properties.
        /// </param>
        public CuitHtmlFileInput(UITestControl testControl, string searchProperties, string filterProperties)
            : base(testControl, searchProperties, filterProperties)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CuitHtmlFileInput"/> class.
        /// </summary>
        /// <param name="wrappedControl">
        /// The wrapped control.
        /// </param>
        /// <param name="searchProperties">
        /// The search properties.
        /// </param>
        /// <param name="filterProperties">
        /// The filter properties.
        /// </param>
        public CuitHtmlFileInput(ICuitControlBase wrappedControl, string searchProperties, string filterProperties)
            : base(wrappedControl, searchProperties, filterProperties)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="CuitHtmlFileInput"/> class.
        /// </summary>
        /// <param name="wrappedControl">
        /// The wrapped control.
        /// </param>
        /// <param name="searchProperties">
        /// The search properties.
        /// </param>
        public CuitHtmlFileInput(ICuitControlBase wrappedControl, string searchProperties)
            : base(wrappedControl, searchProperties)
        {
        }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The set file.
        /// </summary>
        /// <param name="filePath">
        /// The file Path.
        /// </param>
        public void SetFile(string filePath)
        {
            this._control.FileName = filePath;
            this.WriteTestOutput("Set File " + filePath + " on " );
        }

        #endregion
    }
}